#ifndef RECT_H
#define RECT_H

#include "Point.h"

class CRect
{
    public:
        CRect( void );
        CRect( const CRect& rect );
        CRect( int x, int y, int width, int height );
        CRect( const CPoint& position, const CPoint& dimension );
        ~CRect( void );

        void Clear( void );
        CRect& operator=( const CRect& rect );

        //
        //  ACCESSORS AND MUTATORS
        //
        void Set( int x, int y, int width, int height );
        void Set( const CPoint& position, const CPoint& deminsion );
        void SetPosition( const CPoint& position );
        CPoint GetPosition( void ) const { return m_Position; }
        CPoint GetDimension( void ) const { return m_Dimension; }
    private:
        CPoint  m_Position;
        CPoint  m_Dimension;
};

inline void CRect::Clear( void )
{
    m_Position.Clear();
    m_Dimension.Clear();
}

inline void CRect::Set( int x, int y, int width, int height )
{
    m_Position.Set( x, y );
    m_Dimension.Set( width, height );
}

inline void CRect::Set( const CPoint& position, const CPoint& diminsion )
{
    m_Position  = position;
    m_Dimension = diminsion;
}

#endif // RECT_H
